Fill Reshape CUDA operator opset gap from 23 to 25#27742
Conversation
Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
|
/azp run Windows GPU Doc Gen CI Pipeline |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@copilot, please update docs/OperatorKernels.md, and merge latest main branch to this branch. |
Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
|
/azp run Windows GPU Doc Gen CI Pipeline |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Extends CUDA EP support for the ONNX Reshape operator through opset 25 by splitting the existing opset-23 registration into a versioned (23–24) kernel and adding a new “since 25” kernel entry, matching the pattern used in #27728.
Changes:
- Update
ReshapeCUDA kernel registration to cover opsets 23–24 (versioned) and 25+ (new since-version registration). - Update CUDA EP kernel declaration/registry entries to include opset 25 and the new versioned (23–24) entry.
- Update documentation to reflect the new CUDA EP opset coverage for
Reshape.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| onnxruntime/core/providers/cuda/tensor/reshape.cc | Moves existing opset-23 registration to versioned (23–24) and adds new opset-25 registration. |
| onnxruntime/core/providers/cuda/cuda_execution_provider.cc | Updates kernel class forward decls and registry entries to include versioned (23–24) and opset-25 Reshape. |
| docs/OperatorKernels.md | Updates CUDA EP opset coverage doc table for Reshape to show 25+ and [23, 24]. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
tianleiwu
left a comment
There was a problem hiding this comment.
Review Summary
Clean, correct mechanical change. The opset 23 non-versioned Reshape kernel registration is correctly split into a versioned 23–24 registration plus a new since-25 registration. Both versions use the identical Reshape class and type constraints, which is appropriate since the ONNX opset 25 Reshape spec has no semantic changes over opset 24.
Positives:
- Forward declarations and
BuildKernelCreateInfoentries are correctly updated with proper alphabetical placement among opset 25 operators. - Kernel registrations in
reshape.ccfollow the project convention (newest version first). - Type constraints (
AllFixedSizeTensorTypesIRv9) are consistent with other CUDA Reshape opset registrations and with the CPU EP approach. - Documentation in
OperatorKernels.mdis correctly updated.
No concerns found. The version ranges are non-overlapping and complete, no behavioral changes are needed, and the pattern matches established practice for other operators already registered at opset 25 (Scan, Shape, Size, Flatten, etc.).
Description
Extends the Reshape CUDA kernel registration from opset 23 to opset 25, following the same pattern used in #27728.
reshape.cc: Cap existing non-versioned opset 23 kernel → versioned (23, 24); add new non-versioned kernel at opset 25cuda_execution_provider.cc: Update forward declaration andBuildKernelCreateInfofor versioned (23, 24); add opset 25 entriesdocs/OperatorKernels.md: Update Reshape CUDA EP entry from23+to25+and add[23, 24]versioned range rowNo functional changes to the kernel itself — the opset 25 schema is backward-compatible with opset 23.
Motivation and Context
Reshape is listed as a P1 gap in #27729 (CUDA max opset 23, ONNX latest opset 25). Models exported at opset 25 would fail to find a matching Reshape kernel on the CUDA EP.
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.